package com.mt.edu.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 类名称：Course <br>
 * 类描述： 课程<br>
 * 创建人： 马腾 <br>
 * 创建时间：Apr 28, 2014 8:46:08 PM <br>
 * 修改人： 马腾 <br>
 * 修改时间：Apr 28, 2014 8:46:08 PM <br>
 */
@Entity
@Table(name="OL_COURSE")
public class Course implements Serializable  {
	
	private static final long serialVersionUID = -5721937848648654353L;
	
	private String id;
	private String name;
	private String desc;
	private Subject subject;
	private Grade grade;
	private Category category;
	private String coverImage;
	private Integer credit;
	private Integer timeLong;
	private String studyOption;
	private Date studyBeginTime;
	private Date studyEndTime;
	private String passCondition;
	private String status;
	private Integer coursewareNums;
	private Date createDt;
	private Date updateDt; 
	private String operator;
	
	@Id
	@Column(name = "COURSES_ID")
	public String getId() {
		return id;
	}
	public void setId(String id) {
		this.id = id;
	}
	
	@Column(name = "COURSES_NAME")
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "COURSES_DESC")
	public String getDesc() {
		return desc;
	}
	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="SUBJECT_ID")
	public Subject getSubject() {
		return subject;
	}
	public void setSubject(Subject subject) {
		this.subject = subject;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="GRADE_ID")
	public Grade getGrade() {
		return grade;
	}
	public void setGrade(Grade grade) {
		this.grade = grade;
	}
	
	@ManyToOne(fetch=FetchType.LAZY)
	@JoinColumn(name="COURSES_CATEGORY_ID")
	public Category getCategory() {
		return category;
	}
	
	public void setCategory(Category category) {
		this.category = category;
	}
	
	@Column(name = "COURSES_COVER_IMAGE")
	public String getCoverImage() {
		return coverImage;
	}
	public void setCoverImage(String coverImage) {
		this.coverImage = coverImage;
	}
	
	@Column(name = "COURSES_CREDIT")
	public Integer getCredit() {
		return credit;
	}
	public void setCredit(Integer credit) {
		this.credit = credit;
	}
	
	@Column(name = "COURSES_TIME_LONG")
	public Integer getTimeLong() {
		return timeLong;
	}
	public void setTimeLong(Integer timeLong) {
		this.timeLong = timeLong;
	}
	
	@Column(name = "STUDY_OPTION")
	public String getStudyOption() {
		return studyOption;
	}
	public void setStudyOption(String studyOption) {
		this.studyOption = studyOption;
	}
	
	@Column(name = "STUDY_BEGIN_TIME")
	public Date getStudyBeginTime() {
		return studyBeginTime;
	}
	public void setStudyBeginTime(Date studyBeginTime) {
		this.studyBeginTime = studyBeginTime;
	}
	
	@Column(name = "STUDY_END_TIME")
	public Date getStudyEndTime() {
		return studyEndTime;
	}
	public void setStudyEndTime(Date studyEndTime) {
		this.studyEndTime = studyEndTime;
	}
	
	@Column(name = "PASSED_CONDITION")
	public String getPassCondition() {
		return passCondition;
	}
	public void setPassCondition(String passCondition) {
		this.passCondition = passCondition;
	}
	
	@Column(name = "COURSE_STATUS")
	public String getStatus() {
		return status;
	}
	public void setStatus(String status) {
		this.status = status;
	}
	
	@Column(name = "COURSEWARE_NUMS")
	public Integer getCoursewareNums() {
		return coursewareNums;
	}
	public void setCoursewareNums(Integer coursewareNums) {
		this.coursewareNums = coursewareNums;
	}
	
	@Column(name = "CREATE_DT")
	public Date getCreateDt() {
		return createDt;
	}
	public void setCreateDt(Date createDt) {
		this.createDt = createDt;
	}
	
	@Column(name = "UPDTE_DT")
	public Date getUpdateDt() {
		return updateDt;
	}
	public void setUpdateDt(Date updateDt) {
		this.updateDt = updateDt;
	}
	
	@Column(name = "OPERATOR")
	public String getOperator() {
		return operator;
	}
	public void setOperator(String operator) {
		this.operator = operator;
	}
}
